The content of a web page is generally defined by a markup language. A common markup language used in many web pages is HyperText Markup Language (HTML). The look of a web page may be controlled separately through the use of Cascading Style Sheets (CSS). CSS allows web developers to separate the styling of a web page from the content of the web page by styling individual HTML elements on a page according to a predefined set of properties for each element type, such as applying borders or changing spacing or colors in between elements. In this manner, the style of the web page may be altered without altering the HTML content.
Many CSS properties exist to control the fine-grained (or low-level) behavior of many HTML elements. Additionally, the use of JavaScript with CSS and HTML, collectively known as Dynamic HTML (DHTML), allows for the modification of HTML content without reloading the web page by changing an underlying HTML Document Object Model (DOM) element and applying new content or CSS styling, or swapping JavaScript functions to be activated upon the occurrence of specific user events. A pre-packaged, self-contained unit of DHTML for handling the display of a specific aspect of a web page is often referred to as a “widget.”
DHTML toolkits, such as the Dojo Toolkit, provide many such widgets for use in the creation of interactive web applications. It is common practice for widgets to make use of CSS themes that allow for different styling of HTML elements that constitute the display of the widgets. Themeable widgets allow users or page designers to customize the view of a web page. While CSS is designed to modify granular HTML DOM elements created by the widgets, it cannot define custom properties to control the behavior of the widget itself as a single unit. Also, CSS cannot govern the types of DOM elements created nor where they will be created because the structure of each HTML DOM element is outside the control of CSS. Controlling the widgets in such a way under conventional means generally requires that the widgets be modified by a developer, rather than by a page designer.